Host computer digital signal processing system for communicating over voice-grade telephone channels

ABSTRACT

A conventional computer is coupled to an analog telephone transmission link by means of an analog/digital conversion interface adapter. Modem transmission is accomplished by performing the modulation and demodulation functions digitally in the computer&#39;s existing processor which executes programs which transfer data between the computer&#39;s memory and the interface adapter. Using the same interface adapter and existing processor, the arrangement may be used to send and receive images in the form of standard V.29 format facsimile data, to send and receive data operating as a synchronous IBM 3270 compatible terminal device, or to record and play back conventional voice transmissions rather than data to implement a telephone answering, voice message handling, and telemarketing systems.

COPYRIGHT NOTICE

[0001] A portion of the disclosure of this patent document contains material which is subject of copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. Copyright 1993 U.S. Robotics, Inc.

FIELD OF THE INVENTION

[0002] This invention relates to electronic communications systems and more particularly to a system for enabling a computer to transmit and receive information over an analog communications link.

BACKGROUND OF THE INVENTION

[0003] Computers typically use modems to communicate digital information over voice-grade telephone lines. Such modems translate digitally expressed information from the computer into analog tone signals suitable for transmission over the voice-grade telephone facility, and convert such tones back into digital form when received from the telephone line.

[0004] High speed modems may advantageously employ digital signal processing techniques for translating outgoing digital data into a sequence of digital values each representing a desired analog output signal sample amplitude. These digital sample values may then be converted into analog form by a digital-to-analog converter for transmission over the telephone facility., Correspondingly, at the receiving station, the incoming analog signal may be converted into a train of digital sample amplitude values which are then processed to reconstruct the original digital data.

[0005] The processing of the digital sample values is complex and has heretofore been accomplished by one or more dedicated microprocessors which form the heart of the digital modem. For example, the 9600 baud HST modem manufactured by U.S. Robotics Corporation and described in U.S. Pat. No. 5,008,091 issued on Apr. 16, 1991 employs three microprocessors: (1) a transmitting microprocessor dedicated primarily to the translation of digital data into digital sample values; (2) a receiving microprocessor devoted primarily to the translation of sample amplitude values back into digital data; and (3) a supervisory microprocessor which serves as the interface to the computer to which the modem is connected.

SUMMARY OF THE INVENTION

[0006] The present invention, like the digital modems described above,. employs analog/digital conversion methods to convert received analog signals into digitally expressed analog sample values and, during transmission, to convert digitally expressed sample values, into analog form. Unlike prior digital modems, however, in the present invention the digital sample value; signals are not processed by a separate processor or processors within the modem unit, but are rather processed by the microprocessor already present in the connected computer. As a consequence, the cost of the modem is substantially reduced because the need for separate processors is eliminated.

[0007] The arrangement contemplated by the invention is implemented by the combination of a conventional host computer employing a microprocessor and a low-cost interface unit consisting of telephone line adaptor circuitry, an analog/digital converter, and a direct digital interface to the host computer's system I/O bus. The telephone interface unit exchanges digitally-expressed analog sample amplitude values directly with the connected host computer, and the microprocessor within the host computer handles the remainder of the digital processing.

[0008] When operating as a modem, digital data can be processed into a sequence of digitally expressed sample values in accordance with a selected one of several accepted modem formats and transmission speeds. Given processors of speeds typically available, such modem processing can take place in real time to eliminate the need for storing the digital sample data in memory; for example, using the preferred embodiment of the invention to be described, a relatively slow Intel 80286 (IBM-AT class) processor operating at 12 mhertz has been shown to have adequate computational capability to perform the modulation and demodulation processing needed for 2400 baud full-duplex modem operation.

[0009] Without requiring any additional hardware, the system may be programmed to send and receive graphical data as standard V.29 format facsimile data, or to send and receive data synchronously operating, for example, as an IBM 3270 compatible terminal device. Moreover, when the digital sample values represent conventional voice transmissions rather than data, the system may be used to provide automated voice recording and playback functions to implement a telephone answering, voice message handling, and telemarketing systems.

[0010] These and other functions may be added or revised without requiring any hardware modifications by simply changing standard programs which execute on the host processor in standard ways.

[0011] These and other features and advantages of the present invention will become more apparent by considering the following detailed description of a preferred embodiment of the invention. In the course of this description, reference will frequently be made to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0012]FIG. 1 illustrates the major hardware components of the preferred embodiment of the invention;

[0013]FIG. 2 is a block diagram of the major components of the interface card; and

[0014]FIG. 3 is a detailed block diagram of the interface card; and

[0015]FIG. 4 is a functional block diagram illustrating the interaction of the major functions implemented by the host processor under program control.

DETAILED DESCRIPTION

[0016] The preferred embodiment of the invention as illustrated in FIG. 1 consists of auxiliary components mounted on an expansion card 15 which plugs into an available socket 17 on the motherboard 19 of a conventional IBM-compatible Personal-Computer indicated generally at 20. The host computer 20 includes a conventional single-chip integrated microprocessor 22 which executes programs stored in a RAM memory unit which is depicted in FIG. 1 as a group of SIMM (single inline memory module) devices 24 mounted on the motherboard 19. The RAM memory 24 is typically loaded with programs to be executed by the microprocessor 22 from their permanent storage location on a magnetic disk drive (not shown). The programs described which will be described below in connection with this preferred embodiment of the invention are executable on any IBM-compatible personal computer using the MS-DOS operating system. In order to provide adequate computational capacity, the microprocessor 22 is preferably be selected from the Intel 80286, Intel386 or Intel486 families of processors, or their functional equivalents, and should operate at a clock rate of at least 12 megahertz. In the description to follow, reference will also be made to the host computer's standard DMA (direct memory access) controller seen at 26 in FIG. 1. The host computer 20 includes an internal system bus 28 which interconnects the microprocessor 22, the random access memory 24, the DMA controller 26 and the expansion card 15 via the expansion socket 17.

[0017] As seen in both FIGS. 1 and 2, the expansion card 15 is provided with a standard telephone jack 29 through which a connection is made to a conventional voice-grade telephone line 30. The major components included on the interface card 15 are seen FIG. 2. The card 15 takes the form of a standard “half-size adapter card” which plugs into an available expansion slot 17 on the host computer 20 to connect to the host computer's internal bus 28. Detailed information on the structure and operation of the interface bus 28, as well as other aspects of the personal computer system 20, may be found in the applicable IBM Technical Reference Manual, IBM Corporation, Boca Raton, Fla. 33432. Details concerning the Intel family of microprocessors and their companion DMA controllers appears in the Intel Microprocessor and Peripheral Handbook (1990), Intel Corporation,. Santa Clara, Calif.

[0018] The interface card sends and receives analog signals over a voice-grade analog telephone line which is connected at the terminal 29. Two standard RJ11 telephone jacks (not show) may be used to provide convenient external connections to standard telephone equipment, one Jack accepting a plug from the telephone line and the second a plug from a telephone station set which may share use of the line.

[0019] As seen in FIG. 2, the interface card includes a line adaptor circuit interconnects the telephone terminal 29 with a hybrid circuit which splits the analog voice-band signal into inbound and outbound components which are respectively sent to and received from the analog ports of an analog/digital converter 40 (also called the “AIC” or “analog interface chip”). Converter 40 samples received voice-band signals, encodes the sample amplitudes into digitally-expressed values, and sends these values via bus interface circuitry seen at 45 in FIG. 2 to the host computer 20. As described in more detail below, the conventional processor within the host computer 20 processes incoming digitally-expressed sample values to perform one of a variety of functions, depending on the nature of the incoming signal.

[0020] Outbound communications originate within the host computer 20 which processes the information to be sent to create a sequence of digitally-expressed sample amplitude values which are sent via the interface circuitry to the converter 40 which transforms the digital sample values into the corresponding voice band analog signal which is applied via the hybrid circuit 35 and the line adapter 31 to the telephone line connected to terminal 29.

[0021] Signal Reception

[0022] The processing of the incoming voice-grade signal in the interface card is shown in more detail in FIG. 3. The incoming voice-band signal arriving at terminals 31 seen in FIG. 3 may be a conventional telephone voice signal, a modulated-tone data signal from a modem, a facsimile signal, or some other signal capable of being transmitted over conventional telephone links. Regardless of their content, incoming and outgoing signals are processed in the same way by the interface card 15.

[0023] Arriving signals from the telephone link are applied directly via a transformer 33 to the input of an amplifier 35A within a hybrid network 35. The signal appearing at the output of amplifier 35A is applied to the analog input terminal 37 of a two-way analog/digital converter 40. The hybrid network 35 is of conventional design and includes a transmit amplifier 35B which is interconnected with the input to amplifier 35A by means of a resistive network which is arranged such that the transmitted signal from amplifier 35B is greatly reduced in magnitude at the output of the receiving amplifier 35A.

[0024] The converter 40 preferably takes the form of a single integrated circuit device comprising a Model TLC32044 voice band analog interface unit manufactured by Texas Instruments, Dallas, Tex. Detailed information on the structure and operation of the TLC32044 is contained in Data Sheet D3098 (1988) available from Texas Instruments. The TLC32044 integrates an input analog bandpass filter, an analog-to-digital converter including a sample and hold circuit and a successive approximation encoder which converts the input analog signal on line 37 into a 14-bit resolution digital signal. For processing outbound signals, the TLC320444 includes a 14-bit resolution digital-to-analog converter and a low-pass output reconstruction filter.

[0025] The incoming analog signal is applied via line 37 seen in FIG. 3 to the converter 40 and the resulting digitally-expressed sample values are delivered via a bit-serial line 41 into an incoming data shift register 43. When the converter 40 completes the encoding of a sample of the incoming telephone signal, the shift register 43 holds a 16-bit binary word whose 14 most significant bits specify the amplitude of a sample. The value accumulated in shift register 43 is then transmitted via a data bus 29 to the data port pins of the computer's interface bus 28 during a DMA memory transfer operation as next described.

[0026] The analog/digital converter 40 is timed by a clock signal from a clock generator 44 seen in FIG. 3. When the converter has delivered the last (least significant) bit via its bit-serial output 41, an EODR (end of data received) output 45 from converter 40 activated to inform a control unit 50 that the data in the incoming shift register 43 is ready for transmission. Control unit 50 then issues a direct memory access request signal which is transmitted to the interface bus 28 via a control line in the group of control lines depicted in FIG. 1 at 47.

[0027] The interface card 15 preferably makes use of two separate DMA channels which are available in IBM-compatible Personal Computers for use by external devices. The receive channel, which moves incoming information via the shift register 43, is activated by a request to DMA channel 6 (DREQ6 at pin D13 on the standard IBM system bus 28). The DMA controller 26 within the personal computer 20 responds with a DMA acknowledge signal which is returned to the control unit 50 via one of the control lines 47 (connected to receive the signal DACK6 at pin D12 on the system bus 28). The control unit 50 responds to the DMA acknowledgement by gating the information from shift register 43 to the computer interface bus 28 via the data bus lines 29.

[0028] Signal Transmission

[0029] The analog output signal to be transmitted over the phone line is generated by the analog/digital converter 40 which receives digital words, each comprising a 14-bit sample amplitude value and two control bits, from the I/O interface bus 28 via the bus lines 29, an output latch register 54, and an outgoing data shift register 56. The latch register 54 holds one digital sample while the sample previously received from the bus 28 is being sent, one bit at a time, from the shift register 56 to the analog/digital converter 40 via the bit-serial line 58.

[0030] The transfer of information between the bus 28 and the output latch register 54 is also accomplished by means of a DMA transfer. In this case, when the analog/digital converter completes the conversion of a word from the shift register 56, it issues an EODX (end of data transmit) signal on line 59 to the control unit 50 which in turn issues a transfer request to DMA channel by activating one of the lines in the control bus 47 (signal DREQ5 applied to pin D11 of the interface slot to bus 28). The DMA controller 26 acknowledges that it is ready to handle the request by activating another of the control lines 47 (signal DACK5 at pin D10 of the interface slot). The control unit responds by transferring the contents of output latch 54 into shift register 56, and by enabling the output latch 54 to receive the data from interface bus 28 via the data bus 29.

[0031] The bit-serial data applied to converter 40 via line 58 is converted into an analog signal appearing at analog output 60 of the converter 40. The analog output signal on line 60 is then transmitted by the hybrid amplifier 35B and the transformer 33 to the tip and ring terminals 31 of the connected telephone line.

[0032] Supervisory Control

[0033] The microprocessor 22 within the personal computer 20 is directly connected via the interface bus 28 to the interface card 15 and provides general supervisory control over its operation. To accomplish this, the EODR signal on output 45 (one of which appears each time the translation of an incoming analog sample is completed) is applied to increment a 4-stage counter 70 which issues an output interrupt signal on line 72 for each group of 16 incoming words. The interrupt signal on line 17 is applied to a selected one of the available interrupt request lines on the interface bus 28 (the particular line IRQ3 to IRQ7 at interface slot pins B21-B25 may be jumper-selected at the time of installation to avoid conflicts with other peripherals issuing interrupts).

[0034] When data is being sent or received over the telephone line 30, control of the execution of microprocessor 22 is passed to an interrupt handling routine resident in the memory 24. This single routine, the details of which are set forth in the accompanying assembly language listing for the INTS module, calls routines for handling both transmission and reception in accordance with the currently selected mode of operation. These interrupt handling routines process incoming data words from incoming data shift register 43 as those incoming words are assembled in a RAM storage area by the DMA transfer mechanism described above. Secondly, the interrupt handling routines process outgoing information, assemble the outgoing data words indicative of analog sample amplitudes in a RAM storage area pending the DMA transfers to the output latch 54. Note that the single interrupt from line 72, issued on every 16th. received word, triggers the handling of the received data being accumulated in the DMA buffer as well as the assembly, in the transmit DMA buffer, of the outgoing data to be converted into analog sample values.

[0035] In addition, the microprocessor has access at any time to information about the status of the telephone line, and may send control commands to the interface unit 30 to control that unit's operation. The control lines 47 which exchange control information between the control unit 50 and the interface bus 28 include address lines (at interface slot pins A22-A29 to bus 28) which must contain a particular pattern of bits (in the range 35C to 35F, hexadecimal) designating information to or from the interface unit. When the appropriate address is detected, data from the interface port is placed in the board control latch register 74 to control the line. One bit position of latch 74 may be advantageously used to control an electronic off-hook switch seen at 75 in FIG. 1 (which is closed or placed “off hook” to connect the interface unit to the telephone line). A second bit position in the control latch register 74 may be used to connect a speaker 76 to the output of the amplifier 35A by activating a switch 77. A third bit position may be used to reset the AIC 40.

[0036] Correspondingly, a sense latch register 80 includes bit positions which are set by the status of the telephone line. A first bit is set whenever a ringing signal detector 82 connected across the telephone line terminals 31 detects the presence of ringing signals of a predetermined amplitude. A loop current signal detector seen at 84 sets a second bit whenever loop current exceeding a predetermined value is present, indicating an active connection to another system. These status signals may be obtained at any time by a programmed inquiry which places the appropriate I/O address on the address leads within control bus 47.

[0037] Programming Overview

[0038] In the preferred embodiment of the invention, all digital processing of the digitally-expressed analog sample values which are supplied by and delivered to the interface card 15 are processed by the microprocessor in the host computer. Similarly, the digital information which specifies the telephone line status, as well as control information which takes the telephone line on and off hook, is handled by the host microprocessor. As a consequence, substantially any communication and communication control function using a voice-band channel may be implemented with the hardware disclosed above (and nothing more) by providing appropriate programming for the host computer 20.

[0039] The program listing presented at the conclusion of this specification provides numerous functions which allow the combination of the host computer and the interface card to support a rich assortment of voice and data communications applications. The listed source programs are written in conventional assembly language and may be assembled, linked and executed on any IBM-compatible Personal Computer which has sufficient operating speed and which is equipped with the expansion card described above. The assembly language which defines the program and data structures needed to implement the illustrative embodiment is divided into 12 separately listed modules which are summarized below and depicted in FIG. 4 of the drawings: MAIN.ASM The MAIN.ASM module seen at 101 in FIG. 4 initial- izes the interface card hardware and the screen, transmit and receive buffers in the host computer's RAM memory. It displays the main menu by calling the screen handling routines in SCRN.ASM and WIN.ASM as seen at 103 and decodes any user keystrokes which control the system's operation. In addition, it provides routines capable of answering the phone, recording and playing back voice messages to and from standard DOS disk files as indicated at 104, as well as routines that manage the system when it is operating as a data terminal when keystroke data are directly transmitted and received (via modem process- ing) over the telephone link. INTS.ASM This module indicated at 105 handles the interrupts generated by the interface card each time 16 incoming digital samples have been accumulated in the host computers RAM memory by prior DMA transfers as determined by the counter 70 seen in FIG. 3. The interrupt handler calls routines for handling data transmission and reception. In addition, INT.ASM responds to telephone ringing signals generated by detector 82 and line current indications from loop current detector 84 on the interface card 15 as seen in FIGS. 3 and 4. RECVFIL.ASM This module, seen at 107 in FIG. 4, contains the filter- ing routines used to pre-process the incoming analog signal samples which are received via the incoming DMA channel seen at 108 in FIG. 4. When the system is operating as a 1200/2400 baud modem, the RECVFIL.ASM routines 107 process the accumulated digitally expressed sample values from the interface card and performs band-splitting and phase-splitting digital filtering to create filtered samples for demodu- lation, as well as automatic gain control and baud rate synchronization. DEMOD.ASM This module, shown at 109 in FIG. 4, demodulates the filtered sample value from RECVFIL.ASM into data. DBOX.ASM The DBOX.ASM module at 111 provides routines which allow the host computer's screen to provid an scilloscope-like eye-diagram display useful for monitoring the performance of the system during modem data reception. TX.ASM This module, seen at 113, modulates digital data to be transmitted into sample amplitudes which are placed into the transmit buffer from which they are moved via the outgoing DMA channel seen at 114 to the interface card for digital-to-analog conversion into a voice-band analog modem output signal which is transmitted over the phone line. TX.ASM also provides digital filtering to confine the transmitted analog signal to its assigned passband. TONES.ASM This module, indicated at 115, generates touch-tones and answer tones used by the system to perform conventional dial-up telephone signalling. CALLP.ASM The call progress monitoring and control module seen at 117 provides supervisory control of the telephone link. It performs band-pass filtering of the receive samples from the interface card in order to detect ringing signals, answer tones, and touch-tone signals, and uses the tone generating routines in TONES.ASM at 115 to produce comparable outgoing tones. WIN.ASM This module, indicated at 103 along with SCRN.ASM, manages the pop-up windows which appear on the host computer's screen as part of the user interface. This module employs pre-generated character definitions which are specified in the separately listed include file SFT_WINS.INC. SCRN.ASM This module provides screen management routines used when the system is operating in terminal mode. EQUATES This module defines commonly used numbers and keycodes referred to in the other modules.

[0040] The MAIN.ASM module initializes the system and provides the primary user interface. In the discussion of MAIN.ASM and the other modules which follows, unless otherwise noted, the routines being discussed will be identified by their labels and may be found within the listing for the particular module being described.

[0041] When the system is started (typically by the entry of the program's name at the operating system's standard command prompt), it is loaded for execution from disk, and execution begins at the label SOFT_MODEM. The amount of memory allocated to the program is reduced to the size of the program plus the size of the stack, and the routine ALLCATE_BUFFERS is used to create 8 k (16-bit word) memory buffers for the both the transmitted and received sample amplitude values. The video display is then initialized and the routines INIT_AIC and INIT_DMA are called to initialize the TLC32044 analog interface circuit 40 on the interface card 15, and to initialize both the transmit and receive DMA channels. A call is then made to the routine WEDGE_INT (listed in INT.ASM) which hooks into the COM2 interrupt (reconfigurable as COM1 through COM4).

[0042] A check is then made to determine if the user supplied the name of a voice-recording file to be played back along with the program name when the program was called at the DOS command line. If so, the routine PLAYBACK_MSG (to be discussed) is called immediately, with control thereafter being passed to MAIN_EXIT to terminate the program. In this way, the program can be loaded to play back a recorded voice message without invoking any other functions.

[0043] If no recorded message file was specified, ON_HOOK and SPEAKER_OFF are called to insure that hook switch 85 and speaker switch 77 on interface card 15 are both open, and the routine MAIN_SCREEN is begun. The routine INIT_SCREEN (in WIN.ASM) clears the screen and pops up a window for the main menu. The routine at GET_KEY monitors keyboard input and incoming ringing signals.

[0044] If ringing signals are detected, the routine ANSWERING_MACHINE is called to take the telephone line off-hook and then call the routine PLAYBACK_MSG to play back a pre-recorded voice message. The routine PLAYBACK_MSG moves the contents of a disk file, which is a sequential file of digitally-expressed voice sample amplitudes, into the transmit buffer, with each transfer being followed by a call to TX_DMA_ON which enables a DMA transfer of the transmit buffer's contents for digital-to-analog conversion by the interface card 15. To conserve disk space, the file of digitally-expressed voice samples may be compressed prior to storage and decompressed prior to playback. After the recorded voice message is played for the caller, SEND_TONES (in TONES.ASM) sends a prompting tone to advise the caller that recording is starting.

[0045] The ANSWERING_MACHINE routine then calls RECORD_MSG to record the incoming message. A DOS file is opened to record the message, the routine INIT_AIC is called to ready the analog interface circuit 40 to receive at 9600 samples/second, and the incoming samples from the interface board are moved by DMA transfer to the receive buffer from which they are recorded on disk, in 4 kilobyte blocks, in a standard DOS file.

[0046] Main Menu Functions

[0047] The routine in MAIN.ASM beginning at MENU_COMMAND processes user keystrokes to invoke functions selected by the user from the following available options which demonstrate the system's capabilities: KEY OPERATION F1 Go to data mode by calling ORIGINATE_MODE_INIT followed by COMM_MODE, which takes keystrokes entered by the user and sends them to the transmitter (to be discussed), and looks for characters from the receiver and puts them on the screen. When operating in terminal mode, the user can press the F2 key to enter the display box mode by calling INIT_DBOX (in DBOX.ASM) in which case the received characters are buffered and keystrokes are processed through the display box menu. F2 Record voice off the telephone line by calling RECORD_MSG discussed above. F3 Play back a recorded voice message by calling PLAYBACK_(—) MSG discussed ab ve. F4 Send an answer tone over the phone line by calling SEND_(—) TONES (listed in TONES.ASM) as discussed above. F5 Perform ORIGINATE_MODE by dialing a phone number (using DIAL in TONES.ASM) and, if answered, attempts to establish a modem link (using CALLP_MAIN in CALLP.ASM which initiates the expansion card and enables the receiving DMA transfers) in 1200 baud originate mode (by calling INIT_RECV in DEMOD.ASM), and then calls COMM_MODE to perform communications with the remote modem. F6 Execute call progress functions by calling CALLP_MAIN (listed in CALLP.ASM). F7 Execute tone detection by calling TOUCH_TONE_DETECT (listed in CALLP.ASM). F8 Execute automated voice message handling by calling MESSAGING_SYSTEM. This routine uses DTMF (listed in TONES.ASM) to produce the dual dial tones for each digit to be dialed in a number taken from a list of numbers to be dialed. MESSAGING_SYSTEM plays back a message asking the person who answers the remote phone to press the touchtone “1” key on their stationset, then waits to accept the response, at which time MESSAGING_SYSTEM plays back a prompting message and then records the called party's response using PLAYBACK_MSG and RECORD_MSG, and then terminates the conversation by calling ON_HOOK. Alt-H Toggle between on/hook and off/hook using CHK_ON_OFF_(—) HOOK. Alt-S Toggle the speaker between on and off conditions using CHK_(—) SPKR. Alt-P Change parity by calling NEW_PARITY. Alt-A Toggle answering machine enabled/disabled states using CHK_(—) ANSWER_MODE. F10 Exit the program and return control to DOS after calling DISABLE_INT (listed in INTS.ASM) to restore the original COM2 interrupt vector and disabling DMA transmission and reception.

[0048] Screen Handling Routines

[0049] As seen in the listing WIN.ASM, the routine FILL_SCREEN fills the screen with a background color, WINDOW_UP moves a previously stored window image from a screen buffer to the active screen, and WINDOW_FLIP swaps the active screen memory with the contents of a screen buffer.

[0050] The screen is initialized for the terminal mode by a call to INIT_COMM_SCREEN (listed in SCRN.ASM) which is called when data mode is entered. This routine paints the screen blue by calling INIT_SCREEN (in WIN.ASM), which in turn calls WINDOW_UP, brings up data mode windows which indicate speed and parity, and then saves the written screen to a screen buffer for later use.

[0051] SCREEN_OUT (listed in SCRN.ASM) performs the terminal mode functions. After checking for special characters, received characters are displayed on the screen. Special characters are the line feed, carriage return and backspace characters, which are handled by the appropriate display-point repositioning functions. If the cursor is on the last line of the screen, a line feed or carriage return character causes the screen lines to scroll upwards. The routine PRINT_PARITY listed in SCRN.ASM is called to place the currently active parity and word length indications on the screen.

[0052] The display box mode is entered by calling INIT_DBOX listed in DBOX.ASM. INIT_DBOX calls routines which draw an oscilloscope face on the screen along with a menu of display box options (DBOX_MENU) and initializes the video controller to enable modification of all video planes. The display box may have up to eight points on the screen (POINT0-POINT7) each of which is defined by a data structure of type SCOPE_POINT. The routine PLOT_POINT places yellow dots on the screen using the publicly declared horizontal and vertical coordinates X and Y. Each dot displayed consists of three lines of dots. RESTORE_OLD removes the yellow pixels and replaces them with either light gray, dark gray or blue, depending on whether the pixel is positioned on the blue background of a reference line. DO_COLOR reads the old point out of the data structure and is called three times, once for each color. SAVE_COLOR saves the bits is also performed once for each color and saves the bits where the new dots will go. GET_COLOR reads the video RAM and checks for an intersection between a new oscilloscope dot and the desired color. The eye diagram of the incoming signal is produced by the demodulation routine DEMOD in DEMOD.ASM which, at the label DISPLAY_BOX, sets the variables X and Y and calls PLOT_POINT.

[0053] Call Progress Monitoring

[0054] The routines for monitoring and controlling the telephone circuit connected to the interface card 15 are listed in CALLP.ASM which begins by defining various coefficients and delay line values used by the call progress filters.

[0055] The routine CALLP_FILTERS executes a filtering algorithm for each input sample value in the received sample buffer, and calculates a mean square output level value for each filter. As indicated by the comment lines in the assembly language listing, the DC component is first removed from the sample value, and the input sample is then processed by the ANSWER_TONE_FILTER routine, at the end of which a check is made to determine if the system is currently waiting for the answer tone to end (which occurs during the originate mode training sequence to be described). The voice filtering algorithm may then performed to obtain a means square voice level indication (in the CALLP.ASM listing, the voice filter algorithm has been commented out to reduce runtime, but is retained here for illustration). Next, the call progress filtering routine is performed to detect dial tones, busy tones, and ringing signals. The mean square level (power level) output from each filter is transferred into a holding location for CALLP_MAIN to test later whenever SAMPLE_COUNT is decremented to zero.

[0056] The DTMF_FILTERS algorithm performs basically the same function as the call progress filters described above, except that the dual tones are written. In this illustrative embodiment, a filter for the touch-tones for “1” only are present, and the detection of a received “1” tone is used in the example voice message handling system implemented by the routine MESSAGING_SYSTEM (in MAIN.ASM) described above. The routine GET_TOUCH_TONE detects the “1” touch tone and waits for it to terminate.

[0057] The call progress system is initialized by CALLP_INIT which initializes the analog interface circuit 40 and the input counters. The mean square outputs are inspected every 256 sample times (35.5 millisecond intervals) to simplify division of the mean square values.

[0058] CALLP_MAIN performs the DMA initialization and waits for 256 samples to be received and the filter outputs to be computed. It then tests the mean square values to determine if an answer tone has a sufficient magnitude (at least 4000H and also greater than ¼ of the total energy on the line), and that such a tone has been present for a predetermined duration. CALLP_MAIN also calls PRINT_CALLP which displays the mean square filter output levels (useful for testing and debugging). The routines TOUCH_TONE_DETECT and PRINT_DTMF are similarly available to indicate the receive levels coming through the DTMF filters for testing purposes.

[0059] The routine GET_END_ATONE is called after a valid answer tone has been detected. It resets the call progress counters to 4.44 milliseconds in order to detect the end of an answer tone more quickly This routine also enables the transmitter DMA to start the 1200 bps transmitter as part of the training sequence leading to 2400 baud transmission. The routine then waits for the remote location to terminate the answer tone, which triggers the beginning of the 1200 bps receiver function. As soon as the end of the answer tone is detected, the AIC is set to receive at 9600 samples per second.

[0060] Receiver Filtering, AGC and Interpolation

[0061] The digitally expressed incoming analog sample amplitudes are processed by the microprocessor 22 in the host computer system 20 to filter the desired received signals from other signals outside its passband, to split the incoming signal into its two phase-shifted quadrature components, to regulate the signal level of the incoming signal by means of automatic gain control processing, and to compensate for variations in the baud rate of the incoming data by an interpolation procedure. All of these steps, which occur prior to demodulation, are handled by the module listed in RECVFIL.ASM.

[0062] Filtering consists of running the samples through either a high or low bandpass filter to reject the modem's local transmitter. Phase splitting reduces the samples to two sets of complex numbers (real and imaginary) for each baud time of samples (the baud rate being 600 per second), resulting in 1200 complex numbers per second.

[0063] The phase splitting occurs at FILTER_PQ in RECVFIL.ASM. FILTER_PQ is a two stage filter specifically designed to reduce the number of multiplication's and thus reduce execution time. Because of the computational burden placed on the host computer's processor when filtering and demodulating the incoming analog samples, it is essential that efficient algorithms be employed if processors which are in widespread use are to be capable of handling the high baud rates employed by conventional modems now in use. The efficiency of the FILTER_PQ routine, when combined with the efficient demodulation scheme to be described, has been shown to be capable of receiving and demodulating a conventional V.22bis, 2400 baud modem transmissions when executed by a conventional IBM-AT-class Personal Computer employing an Intel 80286 microprocessor operating at 12 Mhz.

[0064] As can be seen at the label FILTER_LOOP, the Cosine and Sine variables are either zero or plus or minus ¼. These values reduce the number of multiplication's and improve operation speed. LOW_STAGE1 and HI_STAGE1 do the pass-band to base-band conversion (4800 and 9600 sample rate conversion down to 2400 samples per second). LOW_STAGE1 performs the front end filtering of the receive low band samples. 4800 samples per second are reduced to 2400 by reading in a single sample and skipping the second because the second Cosine is zero for a total of two samples per loop. HI_STAGE1 reads in the 9600 samples a total of two times, skipping every other one (4 samples per loop) thus reducing the number of samples to 2400. Next the output of the first stage is sent through STAGE2 to be filtered.

[0065] At REAL_DONE, the output value of this routine is divided by 128 or 16 depending on the AGC reaction speed (AGC computed over 16 or 128 samples) and then the absolute value is added to the AGC sum. Each output is then AGCed to bring it up to the correct level.

[0066] The same samples are then processed in the same way by the imaginary filter, DO IMAGINARY. At IMAG_DONE, the imaginary number is added to the AGC sum variable and the multiplication is performed to yield the automatic gain controlled output value. At this point, one quarter baud times worth of samples (one 2400th of a second) have been computed, and the process proceeds by reducing the sample rate to 1200 through the interpolator. Because two or four samples per loop are being handled, the routine is optimized to reduce the number of delay line shifts needed.

[0067] The INTERPOLATOR_ROUTINES perform the baud loop timing for the modem by computing one set of real and imaginary numbers for each two sets of input samples. The routine also looks for differences in timing between the input sample rate and the remote transmitter's sample rate. If the remote transmitter's crystal frequency is a littler faster than the sampling rate established by the analog interface circuit 40 so that, for example, the remote transmitter is sending 1201 real and imaginary pairs per second instead of the standard 1200, the INTERPOLATOR_ROUTINES will generate an additional pair of samples every second. Conversely, one fewer pair will be generated if the remote end is operating at a slower rate than expected. This allows the disclosed arrangement to lock onto the remote end's transmitted baud rate without having to adjust the rate at which samples are delivered via the fixed-rate DMA transfers required by the host computer system.

[0068] INTERPOLATOR_ROUTINES is called by a pointer named BAUDLP_VECTOR immediately after the label ADD_IMAGINARY in RECVFIL.ASM. This routine alternates between buffering the first set of samples and secondly, computing the 1200 rate real and imaginary inputs required by the receiver. Inside SAVE_S1 there is a counter called QUAD_COUNT which, when decremented to zero, indicates that it is time to compute new interpolator coefficients by a jump to NEW_COEFF. This routine looks at the BAUD_X variable in DEMOD.ASM for an underflow or an overflow. These conditions indicate it may be time to compute and extra set of real and imaginary numbers or to skip the next pair. The final sets of real and imaginary numbers (Ps and Qs) are stored in buffers called REAL_BUFFER and IMAG_BUFFER. Because the FILTER_PQ routine can return back with anywhere from 1 to 3 sets of Ps and Qs, those sets are buffered so that DEMOD can handle the under flow/overflow.

[0069] When INTERPOLATOR_ROUTINES is finished, control is returned to FILTER_PQ which then loops three more times, followed by a check to determine if the end of the receive sample buffer has been reached, and if the filter delay lines are full. If so, the delay line variables are copied from the end of the buffer to the beginning, the pointers are reset, and the routine is exited. By using long buffers for the delay lines, it is unnecessary to constantly shift these numbers within the delay lines, thus saving execution time.

[0070] Demodulation

[0071] When filtering and interpolation are completed, control is returned to label EQUALIZER_BUF_CHECK in DEMOD (listed in DEMOD.ASM). A check is performed to determine if there are two sets of Ps and Qs in the buffers. If present, they are copied to equalizer input buffers named EQR_DELAY and EQI_DELAY. At this time, the BAUD_SUM variable is set for use by the baud loop routine used for interpolation. BAUD_SUM is set by adding the absolute values of the first set of Ps and Qs and subtracting the second set.

[0072] The next routine provides automatic gained controlled amplification (AGC). The first thing done is a check of the baud counter to see if four or thirty-two baud times have passed (corresponding to the 16 or 128 divisor used to calculate the AGC average in FILTER_PQ as discussed above). If appropriate, a check is then to determine if the flag that indicates a valid energy level on the phone line has been set. If not, at ENERGY_CHECK, the current energy level (AGC_AVERAGE) is inspected to se if it is above the minimum level (−43 dBm) indicated by ENERGY_THRESHOLD. If there is still no energy, jump (via NO_ENERGY) to EQUALIZER_FULL_CHECK at the end of DEMOD which insures that the equalizer delay lines do not overflow.

[0073] If there is energy for the first time, calculate a new AGC multiplier (at NEW_LEVEL) and start up the receiver. This routine is needed when the user has entered F1 from the initial command buffer (direct to data mode) in order not to run the adaptive equalizer with no input signal. If energy has already been detected and the correct number of baud times has been reached, control is passed to AGC_TESTS.

[0074] Before the AGC tests are performed, a routine labeled CHECK ALPHA slows down the equalizer gain term after 256 baud times. The variable ALPHA is high during training so as to bring the receiver up more quickly. After 256 baud times, ALPHA is reduced to increase performance and reduce variability.

[0075] If the AGC is in wide band mode (fast reacting), control then passes to WIDEBAND_AGC; otherwise, a check is made to see if the new AGC_AVERAGE is either one-half the level or greater than 1.5 times the last AGC_AVERAGE. If it is, control is passed to NEW_LEVEL to compute an AGC multiplier just on that new value. This lets the receiver act quickly to gain hits on the phone line. If neither of these tests pass, the routine adds ⅛th of the new to ⅞these of the old level, and computes a new multiplier from the sum. In this way the AGC reacts smoothly and does not vary quickly, which improves performance on a line with little signal level variations.

[0076] COMPUTE_AGC takes the new AGC_AVERAGE and computes AGC_XSUBE and AGC_MANT, two variables which are used to adjust any receive signal level the optimal level needed by the receiver. Also, the AGC is changed from wide-band to narrow mode after the first 32 baud times (as seen immediately before the label DISPLAY_BOX in the AGC routine).

[0077] DISPLAY BOX checks the RECV_FLAGS register to see if the user is in the display box view mode. If so, the current display box variable is gathered by calling the routine pointed to by DBOX ROUTINE and then the appropriate point is plotted on the scilloscope screen as noted earlier.

[0078] The next routine updates the baud loop variables used by the interpolator routine in FILTER_PQ. The baud loop is controlled by two different loops. A first order baud loop does fine tuning and a second order loop makes coarse adjustments to get the baud loop close to the optimal timing. Every eight baud times the sign of BAUD_SUM is checked. Depending on the sign, a decimal 160 is added or subtracted from BAUD_X. Also, BAUD SUM is divided by 128 and added to LOOP_INT2, the second order baud loop integrator. LOOP_INT2 is then checked to make sure it stays within the bounds of F200 to OEFF, hexadecimal. This puts a maximum limit on how much the baud loop can correct for timing differences between itself and the remote modem.

[0079] At BAUD_LOOP2, a counter called LOOP2_CNT is decremented. When it reaches zero, the sign of LOOP INT2 is checked and 160 is added or subtracted from BAUD_X. At label GET_NEW_COUNT, LOOP2_CNT is reloaded from the table BAUD_LOOP2_TABLE (defined at the beginning of the DEMOD.ASM listing immediately before the code). The value loaded from BAUD_LOOP2_TABLE is determined by an offset into the table which comes from the high order eight bits of LOOP2_INT. As LOOP2_INT grows to bigger levels, LOOP2_CNT is reloaded with a smaller and smaller count, causing the second order baud loop to make more frequent adjustments to BAUD_X. BAUD_X is then used by the interpolator to know when to skip or add an extra set of Ps and Qs to the equalizer delay line.

[0080] The routine EQUALIZER_OUTPUT generates the actual receive data point from the incoming Ps and Qs. The algorithm performs a complex number multiplication between the complex numbers in the equalizer delay line and the complex taps. Each of the last 7 baud times (14 taps) of Ps and Qs are multiplied with their respective taps and the results are summed. What results is the complex number RZN+j IZN, which is the data point.

[0081] In the following routine, PHASE_ROTATION, the equalizer output is rotated into the correct quadrant by the Cosine and Sine of the phase angle PHI. This is done through the multiplication of RZN+j IZN by negative COSINE+j SINE. The resulting point is RYM+j IYM.

[0082] The next routine performs the calculations to determine which point in the signal constellation RYM+j IYM is closest to. Once this is determined, the data pattern associated with this point is known and the demodulation of the analog signal is complete. Also, the nearest perfect point is saved into DEC_R+j DEC_I and an error vector from this point to the point we demodulated is generated and stored into R_ERROR+j I_ERROR. There are separate routines 1200 and 2400 baud because the signal constellations are different.

[0083] For 1200 baud, because there is only four possible points, the process is as simple as comparing the signs of both RYM and IYM to determine which of the quadrants the point resides in. At label DECISION_(—)1200, the sign of RYM is tested. If it is positive, the absolute decision point, 49 * 256, is placed in DEC_R and this value is subtracted from RYM to get the error vector, R_ERROR. Also, the offset into DECISION_TABLE, where the actual data sent from the other end is decoded, is placed into the BL register. This process is repeated for IYM to yield DEC_I and I_ERROR. At the label READ_DECISION, the receive data is read out of DECISION_TABLE and placed into RECV_DATA.

[0084] The process for decoding data at 2400 bits per second is a little different in that there are sixteen possible decision points. Consequently, the routine inspects the sign of RYM and j IYM, as well as their magnitudes. Once the error vectors and decision points are determined, the code branches to READ_DECISION and the receive data is read out of DECISION_TABLE as in the 1200 case above.

[0085] The next step is to update the taps with the counter-rotated error vector. By doing this, the taps learn what types of errors are being generated by the phone line and they move in a direction that can correct for these errors. The counter-rotated error vector is scaled down by ALPHA so that the taps cannot be significantly changed by any one baud time error. The counter rotation is done my multiplying R_ERROR+J I_ERROR by COSINE−j SINE, and then again multiplied by ALPHA. The results are placed in AREN+j AIEN.

[0086] The routine DO_TAP_UPDATE multiplies all fourteen of the taps (RW+j IW) by (AREN+J AIEN). Before this, however, the taps are all “bled” a little to keep them from becoming too big. This is done by repeating the macro BLEED_TAP (defined at the beginning of the DEMOD.ASM listing) 28 times, each time adding four to a negative tap or subtracting four from a positive tap, thus pulling all taps toward zero. BLEED_TAP is performed for both the real and imaginary parts of all taps.

[0087] Next, the phase loop is updated so that it can recalculate COSINE and SINE for the next baud time. To do this, the output of the equalizer RYM+j IYM must be multiplied by the negative of the decision point DEC R−j DEC I. Only the imaginary vector is needed so RERR need not be recalculated. Thus, IERR−(IYM * DEC R)−(RYM * DEC I). Also, the routine multiplies IERR by two to meet the needed gain for PHASE_UPDATE.

[0088] PHASE_UPDATE employs a first and second order phase loop which locks onto the phase roll of the remote transmitter. PHI is the new phase angle determined by the code. The upper eight bits of PHI are then used to access a pre-computed COSINE and SINE from the tables listed in TONES.ASM. This algorithm use of tables indexed by the phase angle PHI substantially improves execution speed by eliminating multiplications.

[0089] The S1_DETECT routine functions is a matched filter which detects the presence of the S1 digit sequence defined in the V.22bis CCITT specification. The S1 transmit sequence is used to signal the remote receiver that the other end is a 2400 baud modem, or that the other end wants to initiate a 2400 baud retrain. The S1 sequence is composed of unscrambled 11's then 00's at 1200 baud that create a specific tone on the line. S1_DETECT determines the presence of the tone by looking at the numbers in the real equalizer delay two baud times apart. If the difference in these numbers is above a certain threshold a counter, S1_COUNTER, is incremented. If the difference is below the threshold, the counter is decremented by four. If the counter ever reaches 20, S1 has been detected.

[0090] The routines starting at DATA_DECODE perform the necessary computations to parse the incoming data stream into ASCII characters.

[0091] At 1200 baud, the two received data bits are stored in bits 2 and 3 of RECV_DATA.

[0092] At 2400 baud, the incoming data is decoded in accordance with the V.22 and V.22bis specification bits 0 through 3 are valid data. First, differential decoding is performed by subtracting the previous baud times' bits 2 and 3 from the baud time's data. Next, the Gray decoding process checks bit 3 and, if it is zero, bit 2 is inverted. Descrambling parses four bits at a time so that, at 1200 baud, the first baud times data bits are placed into DATA_(—)1200, the routine waits for the second baud times data, and then combines the two at COMBINE_(—)1200_DATA before descrambling. DESCRAMBLE_(—)4 performs the descrambling routine specified in V.22 and V.22bis.

[0093] After the descrambler, the data is now in the same format as sent to the modem by the remote data terminal equipment: asynchronous ASCII data. The routine then searches the incoming data for a start bit, parse the next eight data bits into an ASCII character, and then puts the result into the receive character buffer for the terminal loop to display on the screen.

[0094] At RECEIVE_PARSER, a state variable R_PARSE JMP is tested to see if it's zero and, if it is, the routine jumps to CHECK_FOR_START to look at the four bits out of the descrambler to see if there are any zeros present. If there are, the data is moved into R_PARSE_DATA, and R_PARSE_JMP is set to PARSE_(—)8. The next time into the loop, RECEIVE_PARSER jumps to PARSE_(—)8 where the next four receive bits are combined into R_PARSE_DATA. Four data bits are still needed to complete the ASCII data, so R_PARSE_JMP is set to PARSE_(—)12.

[0095] At PARSE_(—)12, enough data has been collected to form the character, so it is now necessary to determine where the character is in the received 12 bits of data. This depends on where the start bit is located. PARSE_(—)12 begins by shifting the received 12 bits right until a zero enters the carry flag. Once a zero is detected, the eight data bits of the receive character are in the AL register, from which they can be stored into RX_CHAR_BUF, and the pointers into R_CHAR_BUF are updated. The bit counters are then checked to see how many of the received 12 bits are left. Depending on where the start bit was located there can be up to three data bits left over. These bits are checked to see if there is another start bit. If there is, the routine recreates R_PARSE_DATA so that it has four valid bits in the low order and resets R_PARSE_JMP to PARSE_(—)8. Code outside the interrupt handling routines checks to see if any characters have been placed in RX_CHAR_BUF and displays them in terminal mode.

[0096] The last thing done by the receiver, at EQUALIZER_FULL_CHECK, is to make sure that the equalizer delay line buffers are not full. The previous 6 baud times worth of Ps and Qs must always be available; consequently, when the equalizer is full, the last 12 Ps and Qs are copied to the beginning of the EQR_DELAY and EQI_DELAY. Also, the EQUALIZER_IN pointer is reset to point into location 13.

[0097] Modulation

[0098] The transmitter routines listed in TX.ASM are substantially less complex than the demodulation routines because modulation is a determinate process.

[0099] The first two routines in TX.ASM, INIT_TX and SETUP_SAMPLE_COUNT, initialize the transmitter variables. INIT_TX resets the pointers into the transmitter sample buffers and calls SETUP_SAMPLE_CNT which tests to see if transmission is to be performed in the low band (8 samples per baud time) or high band (16 samples per). SETUP_SAMPLE_COUNT also sets up the transmit buffer threshold, SAMPLE_COUNT, to either 100 samples for low band or 200 for high band. SAMPLE_COUNT insures that there are always enough samples in the buffer to handle the case where the transmitter routine will not receive control for a prolonged period (which occurs, for example, when interrupts are turned off while the PC is changing video modes). This safeguard adds a 20 ms delay into the transmit path.

[0100] TX1224, the code which performs the actual transmission, is reached through the transmit vector, TX_VECTOR, in the interrupt handling routine SOFTMODEM in INTS.ASM which, as described above, receives control each time the interface card 15 generates an interrupt at every 16th receive sample.

[0101] The first thing TX1224 does is check the number of samples in the transmit buffer. If the count is less than SAMPLE_COUNT, another baud times worth of samples is processed. DO_TX is the actual start of the transmitter process. Flags are first checked to see if the system is operating in a forced data mode in which all marks (ones) or the dibit pattern S1 is to be sent. If either of these flags is set, control is passed to SEND_MARKS.

[0102] At CHECK_TX_DATA, the routine first checks to see data is being parsed. If so, control is passed to the routine pointed to by T_PARSE_JMP. If not, control is passed to CHECK_TX_CHAR where a test is performed to determine if any ASCII characters to be sent are present in TX_CHAR_BUF. If there are none, control is passed to SEND_MARKS. If characters are ready to be sent, they are read from TX_CHAR_BUF, the pointers to that buffer are updated, and a start bit is inserted into the data before it is stored in SEND_DATA. The parser vector, T_PARSE_JMP, is set to PARSE_(—)4_(—)2_DATA.

[0103] The PARSE_DATA routines are listed at the end of TX.ASM. PARSE_(—)4_(—)2_DATA sets the parser vector to PARSE_(—)2_DATA, obtains the next four data bits of the ASCII character and returns. PARSE_(—)2_DATA then takes the last data bit of the character, appends on three stop bits, and checks for another character to be sent. If there are no more characters to be sent, the routine resets T_PARSE_JMP to zero and returns. If there is a character to be sent, the routine gets the character and updates the buffer pointers, and then shifts the character left three bit positions such that this new character is given a start bit. The routine then inserts the two remaining bits of the last character and saves it off. Next, the new character is shifted right by four, a stop bit is inserted, and T_PARSE_JMP to set to PARSE_(—)4_(—)4_DATA. PARSE_(—)4_(—)4_DATA parses the next four bits of the TX char and sets T_PARSE_JMP to PARSE_(—)4_(—)0_DATA. PARSE_(—)4_(—)0_DATA parses the last three bits of the second data byte plus the stop bit and resets T_PARSE_JMP to zero so that the process is returned to state 0.

[0104] As seen in TX.ASM at SCRAMBLER, the data is scrambled using the algorithm specified by the V.22 and V.22bis specification. At CHECK_(—)1200, the low order two bits of the scrambler output are saved for the next baud time. The next two processes, GRAY_ENCODE and DIFF_ENCODE perform the appropriate Gray and differential coding defined in the V.22 and V.22bis specification.

[0105] The next routines process the transmit data into sample amplitude values which are delivered to the interface card 15 for digital-to-analog translation by the AIC 40. For each possible data value there are six sets of samples, and the pointers to these samples are called AN0_PTR, AN1_PTR, AN2_PTR, BN0_PTR, BN1_PTR, and BN2_PTR. AN0_PTR and BN0_PTR are read from a table at an offset location equal to the current transmit data value. The other four pointers are the AN0 and BN0 pointers saved from the last two baud times. Next, the transmit sample is created by adding the three values pointed to by the AN pointers, multiplying them by 1 or −1 depending on which sample is being formed, and putting the result into TEMP_TX_BUF. Next, the three values pointed to by the BN pointers are added together and the sum is either added or subtracted from the corresponding TEMP_TX_BUF value depending on the 1 or −1 multiplier. This process is done for either 8 or 16 samples, depending on whether transmission is to be made in the low or high band respectively. Once the samples are completely formed in TEMP_TX_BUF, they are copied into the transmit sample buffer making sure to take into account the position of the end of the buffer.

[0106] When transmitting low band samples during the training sequence, it is necessary to change the receive sample rate from 7200 samples per second (needed for call progress functions) to 9600 samples per second needed by the receiver code. To change the sampling rate, AIC commands are imbedded into the data stream in the routine SEND_AIC_CMDS. This routines takes a transmit sample, ORs it with binary 3 which tells the AIC there is a command following this data sample, and the puts the command into the next location. To change the sample rate, two consecutive commands are sent.

[0107] The process differs during high band transmission. Alternating samples are filled with the sum of the AN's and then the sum of the BN's, and the need to send AIC commands does not arise; consequently, there is always room in the sample buffer for a full baud times worth of samples. Once the TX samples have been moved into the TX sample buffer, the HIGH_BAND_FILTER routine shifts the AN and BN delay lines and returns.

[0108] The functions provided to the user by the program described are, of course, merely illustrative of the communications functions which can be implemented by suitably programming the host processor to exchange information with the interface card. In addition to the 1200 baud, originate mode modem communications capability implemented as operational code in the program listing which follows, much of the code necessary to implement 2400 baud V.22bis modem communication is also included in the following listing, although a fully operative 2400 baud system has not been completed and hence the 2400 baud routines that are included have not been fully tested. It should also be noted that the disclosed hardware, suitably programmed, can provide a variety of additional functions, such as facsimile and synchronous data transmission, as well as other modem modulation schemes such as the Bell 208 or U.S. Robotics HST asymmetrical transmission modes. Additional routines for performing more elaborate line equalization, echo suppression, adaptive transmission rate adjustment (“fall forward” and “fall back” to adjust to transmission noise conditions), error correction and data compression algorithms can be readily implemented by programming the host processor to manipulate transmitted and received data, either on either a concurrent, real-time basis, or by processing the data before transmission begins or after it concludes. It should also be noted that, because the telephone interface operates under direct control of the host processor, it is unnecessary to embed control sequences (e.g. AT command code sequences) within the data stream to provide communications control functions. It is accordingly possible to much more rapidly respond to events which occur, either in the host computer, the telephone link, or at the remote data terminal equipment, so that flow control procedures (for example) can be more rapidly, more transparently, and more effectively handled than is currently possible with separate modems which must be controlled by escape signals imbedded in the data stream, typically with mandatory guard times which accompany the unique pattern of characters forming the escape signal.

[0109] Most importantly, however, the present invention is implementing virtually any voice or digital communications function which can be accomplished over voice-grade lines without needing different hardware. This versatility is achieved by transferring substantially all of the functionality from the conventional separate communications processor (which is typically programmed with resident firmware and/or employs special purpose analog or digital circuitry for signal processing functions) to the available processor in the host computer, which can be programmed to perform a suite of functions whether presently available or yet to be developed.

[0110] It is to be understood that the arrangement which has been described, and which is implemented by the programs listed below, is merely illustrative of one application of the principles of the invention. Numerous modifications may be made by those skilled in the art without departing from the true spirit and scope of the invention.

[0111] Program Listing

[0112] The assembly language listing for the modules discussed above appears below: 

What is claimed is:
 1. The method of receiving data values transmitted as a tone-modulated signal from a remote modem via a voice-grade telephone link to a local general purpose computer, said local computer having an internal processor and a memory, said method comprising, in combination, the steps of: connecting an analog-to-digital converter between said telephone link and said computer, operating said analog-to-digital converter to store in said memory a incoming sequence of digital values representing samples of the amplitude of said tone-modulated signal as received over said telephone link, and operating said processor to execute a demodulation program stored in said memory for processing said sequence of values to reconstruct said data values.
 2. The method of claim 1 further comprising, in combination, the steps of: connecting a digital-to-analog converter between said telephone link and said computer, operating said processor to execute a modulation program stored in said memory for processing outgoing data values into an outgoing sequence of amplitude values, and operating said digital-to-analog converter to transmit a tone-modulated signal to said remote modem.
 3. The method of claim 1 further comprising, in combination, the steps of: monitoring the operation of said analog-to-digital converter to detect the reception of a predetermined number of said incoming digital values, and issuing an interrupt to said processor when said number is detected to begin the execution of said demodulation program.
 4. The method of claim 2 further comprising, in combination, the steps of: monitoring the operation of said analog-to-digital converter to detect the reception of a predetermined number of said incoming digital values, and issuing an interrupt to said processor when said number is detected to begin the execution of said modulation and demodulation programs.
 5. The method of claim 1 wherein said local computer includes a direct memory access controller for handling data transfers to and from said memory independently of the operation of said processor, said method further comprising, in combination, the steps of: delivering a direct memory access transfer request signal from said analog-to-digital converter to said direct memory access controller each time said converter produces a given one of said values in said incoming sequence to effect the storage of said given value in said memory.
 6. In combination with a computer of the class comprising an integrated-circuit microprocessor and a random access memory, apparatus for transmitting and receiving digital data over an analog communications link comprising, in combination, an input register, an output register, and means for transferring units of information between each of said registers and said random-access memory, analog-to-digital conversion means having an input connected to receive an incoming analog signal from said link and an output connected to supply a sequence of incoming digital sample values to said input register, each of said incoming digital sample values representing the amplitude of a sample of said incoming analog signal, digital-to-analog conversion means having an input connected to receive outgoing digital sample values from said output register, each of said outgoing digital sample values being indicative of the amplitude of a sample of an analog output signal, said digital-to-analog conversion means having an output connected to supply said output signal to said link, a modem modulation routine stored in said random-access memory and executed by said microprocessor for translating digital data to be transmitted into said outgoing sample values, and a modem demodulation routine stored in said random-access memory and executed by said microprocessor for translating said incoming sample values into digital data.
 7. Apparatus as set forth in claim 6 including means coupled to said analog-to-digital conversion means for generating an interrupt signal each time a predetermined number of incoming digital samples have been received, and means for delivering said interrupt signal to said microprocessor to initiate execution of said modem demodulation routine.
 8. Apparatus as set forth in claim 7 further including means responsive to the receipt of said interrupt signal by said microprocessor for additionally initiating the execution of said modem modulation routine.
 9. Apparatus as set forth in claim 7 further including, in combination, a direct memory access controller connected to said random access memory for transferring data to and from said memory without the aid of said microprocessor, means responsive to said analog-to-digital conversion means for transmitting a memory storage request signal to said controller to transfer of said incoming digital samples to said random access memory, and means responsive to the execution of said modulation routine for transmitting a memory retrieval request signal to said controller to transfer said outgoing digital values to said digital-to-analog conversion means.
 10. In combination with a computer of the class comprising an integrated-circuit microprocessor and a random access memory, apparatus for transmitting and receiving information over an analog communications link comprising, in combination a sample data input register, a sample data output register, analog-to-digital conversion means having an input connected to receive an incoming analog signal from said link and an output connected to supply a sequence of incoming digital sample values to said sample data input register, each of said incoming digital sample values representing the amplitude of a sample of said incoming analog signal, digital-to-analog conversion means having an input connected to receive outgoing digital sample values from said sample data output register, each of said outgoing digital sample values being indicative of the amplitude of a sample of an analog output signal, said digital-to-analog conversion means having an output connected to supply said analog output signal to said link, an incoming sample processing routine stored in said random access memory, an outgoing sample processing routine stored in said random access memory, means coupled to said analog-to-digital conversion means for generating an interrupt signal each time a predetermined number of incoming digital samples have been received, and means for delivering said interrupt signal to said microprocessor to initiate execution of said incoming sample processing routine.
 11. Apparatus as set forth in claim 10 further including means responsive to the receipt of said interrupt signal by said microprocessor for additionally initiating the execution of said outgoing sample processing routine.
 12. Apparatus as set forth in claim 11 further including, in combination, a direct memory access controller connected to said random access memory for transferring data to and from said memory without the aid of said microprocessor, means responsive to said analog-to-digital conversion means for transmitting a memory storage request signal to said controller to transfer of said incoming digital samples to said random access memory, and means responsive to the execution of said outgoing sample processing routine for transmitting a memory retrieval request signal to said controller to transfer said outgoing digital values to said digital-to-analog conversion means.
 13. Apparatus as set forth in claim 10 wherein said information being received over said telephone link takes the form of a tone-modulated signal produced by a remotely located modem to represent a digital message signal and wherein the execution of said incoming sample processing routine demodulates said sample values to reconstruct said message data.
 14. Apparatus as set forth in claim 10 wherein said computer further comprises a magnetic disk storage device, wherein said information being received over said telephone link takes the form of an analog voice signal, and wherein the execution of said incoming sample processing routine stores a file of digital values representative of said analog voice signal on said magnetic disk storage device.
 15. Apparatus as set forth in claim 14 wherein the execution of said outgoing sample processing routine retrieves a file of outgoing digital sample values from said magnetic disk storage device and transfers said outgoing values to said digital-to-analog conversion means to transmit a voice signal over said telephone link.
 16. Apparatus as set forth in claim 15 further comprises, in combination, means for detecting ringing signal received over said telephone link from a remote caller, a call answering routine stored in said memory and executed by said computer for executing said outgoing sample processing routine to transmit a voice acknowledgment to said remote caller and for thereafter executing said incoming sample processing routine for recording an incoming voice message from said remote caller.
 17. In combination with a computer of the class comprising, in combination, a microprocessor, a random access memory, a system bus composed of data and control conductors interconnecting said microprocessor and said memory, a direct memory access controller connected to said bus for supervising data transfers to and from said memory via the said system bus independently of the operation of said microprocessor, and at least one expansion slot socket connected to said system bus, An auxiliary circuit card for communicating between said computer and a remote device via a voice-band telephone circuit, said circuit card comprising, in combination, an edge connector including a plurality of electrical terminals adapted for insertion into said expansion slot socket to establish electrical connections to said system bus, a hybrid circuit having a bi-directional telephone line port, an incoming pore for delivering an incoming voice-band analog signal, and an outgoing voice-band port for receiving an outgoing voice-band analog signal, a telephone line adapter circuit connected between said telephone circuit and said bi-directional line port of said hybrid circuit, said line adapter circuit including a hook switch for selectively connecting and disconnecting said telephone circuit and said line port in response to a first control signal, a loop-current detect or for generating a second control signal indicating when an active connection has been established with said remote device, a ringing-signal detector for generating a third control signal indicating when ringing signals are being received over said telephone circuit, and circuit means for transmitting said control signals between said auxiliary circuit card and said system bus via said edge connector, an incoming sample data register connected to said edge connector, an analog-to-digital converter connected between the incoming port of said hybrid circuit and said incoming sample data register for converting sample amplitudes of said incoming voice-band analog signal into incoming digital sample values which are temporarily stored in said incoming sample data register, first control means for applying a direct memory access storage request signal to said edge connector for transmission via said bus to said direct memory access controller each time an incoming digital sample value is temporarily stored in said incoming data register to effect the transfer of said incoming sample value to said memory, an outgoing sample data register connected to said edge connector, a digital-to-analog converter connected between the outgoing port of said hybrid circuit and said outgoing sample data register for converting digital sample amplitude values in said output register into said outgoing voice-band analog signal, second control means for applying a direct memory access read request signal to said edge connector for transmission via said bus to said direct memory access controller each time an sample value in said output register has been converted by said digital-to-analog converter, and third control means applying an interrupt signal to said edge connector for transmission via said bus to said microprocessor each time a predetermined number of incoming digital values have been processed by said analog-to-digital converter.
 18. In combination with a computer of the class comprising, in combination, a microprocessor, a random access memory, and a system bus interconnecting said microprocessor and said memory, an arrangement for communicating between said computer and a remote device via a voice-band telephone circuit connection to a telephone switching office, said arrangement comprising, in combination, a telephone line adapter circuit connected between said telephone circuit and said bi-directional line port of said hybrid circuit, said line adapter circuit including a hook switch for selectively connecting and disconnecting said telephone circuit and said line port in response to a first control signal, a loop-current detector for generating a second control signal indicating when an active connection has been established with said switching office, a ringing-signal detector for generating a third control signal indicating when ringing signals are being received over said telephone circuit from said switching office, and circuit means for transmitting said control signals between said auxiliary circuit card and said system bus, and signal conversion means connected between said telephone circuit and said edge connector for translating an incoming analog signal into incoming digitally-expressed values representative of the amplitude of samples of said incoming analog signal, for supplying said values to said bus via said edge connector, and for translating outgoing digital sample values received from said bus via said edge connector into a voice band analog signal transmitted over said telephone circuit, and call progress control means for supervising the connection between said computer and said telephone circuit via said auxiliary circuit card, said call progress control means comprising, in combination, means including a first set of instructions stored in said memory and executed by said microprocessor for applying a sequence of outgoing digital sample values to said bus which are representative of a sequence of dual dial-tone signals suitable for establishing a dial-up connection via said switching office to said remote device, and means including a second set of instructions stored in said memory and executed by said microprocessor for processing said incoming digitally-expressed sample values to detect the presence of an answer tone received over said telephone circuit from said switching office.
 19. The method set forth in claim 1 further comprising, in combination, the step of receiving and recording voice messages at times when said data values are not being transmitted comprising, in combination, the step of operating said processor to record on a storage device a file of digital signals derived from said incoming sequence, and thereafter playing back said voice messages by reading said file from said storage device.
 20. The method set forth in claim 1 wherein said step of operating said processor alternatively consists of demodulating binarily expressed computer data or translating graphical data being received from a facsimile transmission device.
 21. The method set forth in claim 20 wherein said step of operating said processor comprises the further alternative step of digitally recording voice messages by storing the output from said analog-to-digital converter in a nonvolatile storage device for later playback.
 22. The method set forth in claim 1 wherein said step of operating said processor to execute a demodulation program comprises, in combination, comparing the sampling rate at which said analog-to-digital converter operates with the sampling rate employed by said remote modem and varying the number of samples generated during demodulation of said sequence of values so that said reconstructed data values to provide the same data rate as that of the transmitted data values produced by said remote modem. 